package com.link2room.jetfire.enums;

import org.apache.commons.lang.StringUtils;

/*
 * NOTCFMD未确认，AUTOCFMD自动确认，AUTOREJ自动拒绝，MANUCFMD人工确认,MANUREJ人工拒绝
 */
public enum ReservationConfirmStaEnum {

	NOTCFMD("NOTCFMD", "未确认"),AUTOCFMD("AUTOCFMD", "自动确认"),AUTOREJ("AUTOREJ", "自动拒绝"),MANUCFMD("MANUCFMD", "人工确认"),MANUREJ("MANUREJ", "人工拒绝"),;
	
	private String code;
	private String des;

	private ReservationConfirmStaEnum(String code, String des) {
		this.code = code;
		this.des = des;
	}
	
	public static String getDesByCode(String code) {
		if(StringUtils.isBlank(code) ) {
			return null;
		}
		for(ReservationConfirmStaEnum reservationConfirmStaEnum : ReservationConfirmStaEnum.values()) {
			if(StringUtils.equals(code, reservationConfirmStaEnum.getCode())) {
				return reservationConfirmStaEnum.getDes();
			}
		}
		return null;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDes() {
		return des;
	}

	public void setDes(String des) {
		this.des = des;
	}

}
